﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Dushui.aspx.cs" Inherits="Dushui_Dushui" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
    <style type="text/css">
        .style2
        {
            font-size: medium;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <span class="style2"><strong>堵水部分：</strong></span><br />
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" DataKeyNames="JH,SBRQ" 
        DataSourceID="SqlDataSource1" ShowHeaderWhenEmpty="True" 
        onrowupdating="GridView1_RowUpdating" ondatabound="GridView1_DataBound" 
        AllowSorting="True">
        <Columns>
            <asp:CommandField ShowEditButton="True" EditText="录入" />
            <asp:BoundField DataField="JH" HeaderText="井号" ReadOnly="True" 
                SortExpression="JH" />
            <asp:BoundField DataField="DH" HeaderText="队号" SortExpression="DH" />
            <asp:BoundField DataField="SBRQ" DataFormatString="{0:d}" HeaderText="上报日期" 
                ReadOnly="True" SortExpression="SBRQ" />
            <asp:BoundField DataField="KGRQ" DataFormatString="{0:d}" HeaderText="开工日期" 
                SortExpression="KGRQ" />
            <asp:BoundField DataField="WGRQ" DataFormatString="{0:d}" HeaderText="完工日期" 
                SortExpression="WGRQ" />
            <asp:BoundField DataField="SGFS" HeaderText="施工方式" SortExpression="SGFS" />
            <asp:BoundField DataField="CSCD" HeaderText="措施层段" SortExpression="CSCD" />
            <asp:BoundField DataField="SGCW" FooterText="井下公司提供" HeaderText="措施层位(原始数据)" 
                SortExpression="SGCW" ReadOnly="True">
            <ItemStyle Width="70px" />
            </asp:BoundField>
            <asp:BoundField DataField="SGJDDS1" HeaderText="施工层段顶深" 
                SortExpression="SGJDDS1" />
            <asp:BoundField DataField="SGJDDS2" HeaderText="施工层段低深" 
                SortExpression="SGJDDS2" />
            <asp:BoundField DataField="BZ" HeaderText="备注" SortExpression="BZ" />
        </Columns>
        <PagerSettings FirstPageImageUrl="~/Images/First.gif" 
            LastPageImageUrl="~/Images/Last.gif" Mode="NextPreviousFirstLast" 
            NextPageImageUrl="~/Images/Next.gif" 
            PreviousPageImageUrl="~/Images/Previous.gif" />
        <PagerStyle HorizontalAlign="Center" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionStringForOracle %>" 
        DeleteCommand="DELETE FROM &quot;BC_DUSHUI&quot; WHERE &quot;JH&quot; = :JH AND &quot;SBRQ&quot; = :SBRQ" 
        InsertCommand="INSERT INTO &quot;BC_DUSHUI&quot; (&quot;JH&quot;, &quot;KGRQ&quot;, &quot;WGRQ&quot;, &quot;SGFS&quot;, &quot;CWSYHD&quot;, &quot;CWYXHD&quot;, &quot;BZ&quot;, &quot;SBRQ&quot;, &quot;DH&quot;, &quot;CSCD&quot;, &quot;SGJDDS1&quot;, &quot;SGJDDS2&quot;) VALUES (:JH, :KGRQ, :WGRQ, :SGFS, :CWSYHD, :CWYXHD, :BZ, :SBRQ, :DH, :CSCD, :SGJDDS1, :SGJDDS2)" 
        ProviderName="<%$ ConnectionStrings:ConnectionStringForOracle.ProviderName %>" 
        SelectCommand="SELECT JH, KGRQ, WGRQ, SGFS, BZ, SBRQ, DH, CSCD, SGJDDS1, SGJDDS2, SGCW FROM BC_DUSHUI WHERE (KGRQ IS NULL) OR (WGRQ IS NULL) OR (SGFS IS NULL) OR (SGFS = '机械堵水') AND (CSCD IS NULL) OR (SGFS = '机械堵水') AND (SGJDDS1 IS NULL) OR (SGFS = '机械堵水') AND (SGJDDS2 IS NULL) ORDER BY SBRQ DESC" 
        
        
        
        
        UpdateCommand="UPDATE &quot;BC_DUSHUI&quot; SET &quot;KGRQ&quot; = :KGRQ, &quot;WGRQ&quot; = :WGRQ, &quot;SGFS&quot; = :SGFS, &quot;CWSYHD&quot; = :CWSYHD, &quot;CWYXHD&quot; = :CWYXHD, &quot;BZ&quot; = :BZ, &quot;DH&quot; = :DH, &quot;CSCD&quot; = :CSCD, &quot;SGJDDS1&quot; = :SGJDDS1, &quot;SGJDDS2&quot; = :SGJDDS2 WHERE &quot;JH&quot; = :JH AND &quot;SBRQ&quot; = :SBRQ">
        <DeleteParameters>
            <asp:Parameter Name="JH" Type="String" />
            <asp:Parameter Name="SBRQ" Type="DateTime" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="JH" Type="String" />
            <asp:Parameter Name="KGRQ" Type="DateTime" />
            <asp:Parameter Name="WGRQ" Type="DateTime" />
            <asp:Parameter Name="SGFS" Type="String" />
            <asp:Parameter Name="CWSYHD" Type="Decimal" />
            <asp:Parameter Name="CWYXHD" Type="Decimal" />
            <asp:Parameter Name="BZ" Type="String" />
            <asp:Parameter Name="SBRQ" Type="DateTime" />
            <asp:Parameter Name="DH" Type="String" />
            <asp:Parameter Name="CSCD" Type="String" />
            <asp:Parameter Name="SGJDDS1" Type="Decimal" />
            <asp:Parameter Name="SGJDDS2" Type="Decimal" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="KGRQ" Type="DateTime" />
            <asp:Parameter Name="WGRQ" Type="DateTime" />
            <asp:Parameter Name="SGFS" Type="String" />
            <asp:Parameter Name="CWSYHD" Type="Decimal" />
            <asp:Parameter Name="CWYXHD" Type="Decimal" />
            <asp:Parameter Name="BZ" Type="String" />
            <asp:Parameter Name="DH" Type="String" />
            <asp:Parameter Name="CSCD" Type="String" />
            <asp:Parameter Name="SGJDDS1" Type="Decimal" />
            <asp:Parameter Name="SGJDDS2" Type="Decimal" />
            <asp:Parameter Name="JH" Type="String" />
            <asp:Parameter Name="SBRQ" Type="DateTime" />
        </UpdateParameters>
    </asp:SqlDataSource>
</asp:Content>

